Skip to content

HIVE-29478: FileSinkOperator shouldn't check for isMMTable for everyrow being processed#6341

Merged
abstractdog merged 1 commit into
apache:masterfrom
nareshpr:HIVE-29478
Mar 6, 2026
Merged

HIVE-29478: FileSinkOperator shouldn't check for isMMTable for everyrow being processed#6341
abstractdog merged 1 commit into
apache:masterfrom
nareshpr:HIVE-29478

Conversation

@nareshpr
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

conf.isMMTable() shouldn't be invoked for every row being processed. This came up as hotspot in ETL file write flow.

Why are the changes needed?

It improves write performance, specifically properties to map conversion is not required to validate a single property for every row being processed.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Tests were not added, as its performance improvement.

Copy link
Copy Markdown
Contributor

@abstractdog abstractdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending tests

@abstractdog
Copy link
Copy Markdown
Contributor

@nareshpr : approved, but I've just realized there are a few more occurrences of Maps.fromProperties, can you take care of those please?

@nareshpr
Copy link
Copy Markdown
Contributor Author

yes, i will remove all Map conversion in AcidUtils.

@nareshpr
Copy link
Copy Markdown
Contributor Author

nareshpr commented Feb 28, 2026

@abstractdog I had done the changes, can you please review ?

@abstractdog
Copy link
Copy Markdown
Contributor

@abstractdog I had done the changes, can you please review ?

please take care of the sonarqube warnings (unused imports), other than that, looks good to me

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 2, 2026

@nareshpr
Copy link
Copy Markdown
Contributor Author

nareshpr commented Mar 2, 2026

Taken care of checkstyle unused import. Got successful green build.

Copy link
Copy Markdown
Contributor

@abstractdog abstractdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abstractdog abstractdog merged commit 127c1b0 into apache:master Mar 6, 2026
2 checks passed

public static boolean isTablePropertyTransactional(Properties props) {
return isTablePropertyTransactional(Maps.fromProperties(props));
String resultStr = (String) props.get(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI:
instead code duplication we could have used signature with BinaryOperator<String> props and then

getParameters()::getOrDefault
properties()::getOrDefault

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, this is going to be handled by #6489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants